import requests

class TestTpshop:
    def setup(self):
        # 创建session
        self.session = requests.session()
        url = "http://tpshop-test.itheima.net/index.php?m=Home&c=User&a=verify&type=user_reg&r=0.11838678706232053"
        self.yanzhengma = self.session.get(url=url)
    def test01_zc_success(self):

        url="http://hmshop-test.itheima.net/Home/user/reg.html"
        zc_data={
            "username":"13839865697",
            "verify_code":"8888",
            "password":"a_23456",
            "password2":"a_23456"
        }
        response = self.session.post(url=url,data=zc_data)
        print(response.json())
        assert response.status_code == 200

